<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="areaList.title"/></title>
    <meta name="heading" content="<fmt:message key='areaList.heading'/>"/>
    <meta name="menu" content="AreaMenu"/>
</head>

<div id="search">
<form method="get" action="${ctx}/areas" id="searchForm">
    <input type="text" size="20" name="q" id="query" value="${param.q}"
           placeholder="Enter search terms..."/>
    <input type="submit" value="<fmt:message key="button.search"/>"/>
</form>
</div>

<input type="button" style="margin-right: 5px" class="button" onclick="location.href='<c:url value="/editArea"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" class="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<display:table name="areas" class="table" requestURI="" id="areaList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="editArea" media="html"
        paramId="id" paramProperty="id" titleKey="area.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="area.id"/>
    <display:column property="class_" sortable="true" titleKey="area.class_"/>
    <display:column property="fatherId" sortable="true" titleKey="area.fatherId"/>
    <display:column property="name" sortable="true" titleKey="area.name"/>
    <display:column property="prefix" sortable="true" titleKey="area.prefix"/>
    <display:column sortProperty="type" sortable="true" titleKey="area.type">
        <input type="checkbox" disabled="disabled" <c:if test="${areaList.type}">checked="checked"</c:if>/>
    </display:column>

    <display:setProperty name="paging.banner.item_name"><fmt:message key="areaList.area"/></display:setProperty>
    <display:setProperty name="paging.banner.items_name"><fmt:message key="areaList.areas"/></display:setProperty>

    <display:setProperty name="export.excel.filename"><fmt:message key="areaList.title"/>.xls</display:setProperty>
    <display:setProperty name="export.csv.filename"><fmt:message key="areaList.title"/>.csv</display:setProperty>
    <display:setProperty name="export.pdf.filename"><fmt:message key="areaList.title"/>.pdf</display:setProperty>
</display:table>

<input type="button" style="margin-right: 5px" class="button" onclick="location.href='<c:url value="/editArea"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" class="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<script type="text/javascript">
    highlightTableRows("areaList");
</script>
